cmake_minimum_required(VERSION 3.10)
project(ImageProcessorDemo)

add_compile_options(-fPIC -std=c++14 -fstack-protector-all -Wl, -z,relro,-z,now,-z,noexecstack -s -pie)
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0 -Dgoogle=mindxsdk_private)

set(MX_SDK_HOME $ENV{MX_SDK_HOME})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/")

include_directories(
    ${MX_SDK_HOME}/include
    ${MX_SDK_HOME}/opensource/include
    ${MX_SDK_HOME}/opensource/include/opencv4
)

link_directories(
    ${MX_SDK_HOME}/lib
    ${MX_SDK_HOME}/include
    ${MX_SDK_HOME}/opensource/lib
)

add_executable(demo main.cpp)
target_link_libraries(demo
    glog
    mxbase
)